﻿<UserControl x:Class="TimeSplicerModule.Views.TaskView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
             
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             Width="900" Height="700">
    
    <Grid Name="layoutGrid" VerticalAlignment="Top" HorizontalAlignment="Left">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="550" />
            <RowDefinition Height="60" />
            <RowDefinition Height="40" />
        </Grid.RowDefinitions>
        
        <!-- Tab Control -->
        <Border Grid.Column="0" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5">
            <controls:MetroAnimatedSingleRowTabControl>
                <TabItem Header="Task Info">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100" />
                            <ColumnDefinition Width="215" />
                            <ColumnDefinition />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        
                        <!-- Project Name -->
                        <Border Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Project:" />
                        </Border>
                        
                        <Border Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left">
                            <TextBlock Text="{Binding Path=Project.Name}" />
                        </Border>
                        
                        <!-- Task Name -->
                        <Border Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Task:" />
                        </Border>
                        
                        <!-- Assigned To -->
                        <Border Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Assigned To:" />
                        </Border>
                        
                        <Border Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <ComboBox Name="projectUsersComboBox" ItemsSource="{Binding Path=ProjectUsers}" Width="200" Height="25"
                                      DisplayMemberPath="User.FullName"
                                      SelectedValuePath="UserGuid"
                                      SelectedValue="{Binding Path=AssignedToGuid, UpdateSourceTrigger=PropertyChanged}">
                                
                            </ComboBox>
                        </Border>
                        
                        
                        <Border Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <TextBox Text="{Binding Path=Name}" Width="200" />
                        </Border>
                        
                        <!-- Priority -->
                        <Border Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">                            
                            <TextBlock Text="Priority:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <ComboBox Name="priorityComboBox" ItemsSource="{Binding Path=Priorities}" Width="200" Height="25" 
                                      DisplayMemberPath="Name"
                                      SelectedValuePath="PriorityGuid"
                                      SelectedValue="{Binding Path=PriorityGuid, UpdateSourceTrigger=PropertyChanged}">
                            </ComboBox>
                        </Border>


                        <!-- Category -->
                        <Border Grid.Column="0" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Category:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <ComboBox Name="categoryComboBox" ItemsSource="{Binding Path=Categories}" Width="200" Height="25" 
                                      DisplayMemberPath="Name"
                                      SelectedValuePath="CategoryGuid"
                                      SelectedValue="{Binding Path=CategoryGuid, UpdateSourceTrigger=PropertyChanged}">
                            </ComboBox>
                        </Border>


                        <!-- Sub Category -->
                        <Border Grid.Column="0" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Sub Category:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <ComboBox Name="subCategoryComboBox" ItemsSource="{Binding Path=FilteredSubCategories}" Width="200" Height="25" 
                                      DisplayMemberPath="Name"
                                      SelectedValuePath="CategoryGuid"
                                      SelectedValue="{Binding Path=SubCategoryGuid, UpdateSourceTrigger=PropertyChanged}">
                            </ComboBox>
                        </Border>



                        <!-- Description-->
                        <Border Grid.Column="0" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Description:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="6" Grid.RowSpan="3" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5">
                            <TextBox Text="{Binding Path=Description}" Width="200" Height="100" TextWrapping="Wrap" />
                        </Border>


                        <!-- Right Side  -->
                        <!-- Status -->
                        <Border Grid.Column="2" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Status:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <TextBlock Text="{Binding Path=Status.Name}" Width="200" Foreground="{Binding Path=Status.BrushColor}" />
                        </Border>

                        <!-- Started Date -->
                        <Border Grid.Column="2" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5" Visibility="{Binding Path=StartedDateVisibility}">
                            <TextBlock Text="Started:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5" Visibility="{Binding Path=StartedDateVisibility}">
                            <DatePicker  Text="{Binding Path=StartedDate, Mode=TwoWay}" Width="200" IsEnabled="{Binding Path=StartedDateEnabled}" />
                        </Border>


                        <!-- Due Date -->
                        <Border Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Due Date:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <DatePicker  Text="{Binding Path=DueDate, Mode=TwoWay}" Width="200" />
                        </Border>
                        

                        <!-- Completed Date -->
                        <Border Grid.Column="2" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5" Visibility="{Binding Path=CompletedDateVisibility}">
                            <TextBlock Text="Completed Date:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5" Visibility="{Binding Path=CompletedDateVisibility}">
                            <DatePicker  Text="{Binding Path=CompletedDate, Mode=TwoWay}" Width="200" IsEnabled="{Binding Path=CompletedDateEnabled}" />
                        </Border>

                        
                        <!-- Estimated Hours -->
                        <Border Grid.Column="2" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Estimated Hours:" />
                        </Border>


                        <Border Grid.Column="3" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <controls:NumericUpDown Value="{Binding Path=EstimatedHours}" Minimum="0" Interval="5" />
                        </Border>
                        
                        <!-- Hours -->
                        <Border Grid.Column="2" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Actual Hours:" />
                        </Border>


                        <Border Grid.Column="3" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <TextBlock Text="{Binding Path=ActualHours}" />
                        </Border>


                        <!-- Created  -->
                        <Border Grid.Column="2" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Created:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <TextBlock Text="{Binding Path=CreatedDate}" />
                        </Border>


                        <!-- Created By -->
                        <Border Grid.Column="2" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Created By:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <TextBlock Text="{Binding Path=CreatedBy.FullName}" />
                        </Border>


                    </Grid>
                </TabItem>
                
                <TabItem Header="Scheduler" >
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100" />
                            <ColumnDefinition Width="215" />
                            <ColumnDefinition Width="100" />
                            <ColumnDefinition Width="215" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        
                        <!-- Is Recurring Flag -->
                        <Border Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Is Recurring:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <CheckBox IsChecked="{Binding Path=IsRecurring}" />
                        </Border>

                        <!-- Occurance Type, i forgot what i was doing with this this oops  -->
                        <Border Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Occurence Type" />
                        </Border>
                        
                        <Border Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5" >
                            <ComboBox  Name="occuranceTypes"  Width="200" Height="25" IsEnabled="{Binding Path=IsRecurring}"
                                       ItemsSource="{Binding Path=OccuranceTypes}"
                                       SelectedValue="{Binding Path=Schedule.OccuranceType, UpdateSourceTrigger=PropertyChanged}">
                                <!--<ComboBoxItem Content="Monthly" IsSelected="True" />
                                <ComboBoxItem Content="Weekly" />
                                <ComboBoxItem Content="Daily" />-->
                            </ComboBox>
                        </Border>
                        
                        
                        <!-- Start Time -->
                        <Border Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Start Date:" />
                        </Border>
                        
                        <Border Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <DatePicker Text="{Binding Path=Schedule.StartDate, Mode=TwoWay}" Width="200" IsEnabled="{Binding Path=IsRecurring}" />    
                        </Border>
                        
                        
                        
                        <!-- End Time -->
                        <Border Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="End Date:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <DatePicker Text="{Binding Path=Schedule.EndDate, Mode=TwoWay}" Width="200" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>
                        
                        <!-- Hour -->
                        <Border Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Start Hour:" />
                        </Border>
                        
                        <Border Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <controls:NumericUpDown Minimum="0" Maximum="60" Value="{Binding Path=Schedule.StartHour}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>

                        <Border Grid.Column="2" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="End Hour:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <controls:NumericUpDown Minimum="0" Maximum="60" Value="{Binding Path=Schedule.EndHour}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>

                        <!-- Minute -->
                        <Border Grid.Column="0" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Start Minute:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <controls:NumericUpDown Minimum="0" Maximum="60" Value="{Binding Path=Schedule.StartMinute}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>

                        <Border Grid.Column="2" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="End Minute:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <controls:NumericUpDown Minimum="0" Maximum="60" Value="{Binding Path=Schedule.EndMinute}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>



                        <!-- Am Pm -->
                        <Border Grid.Column="0" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Start AM/PM:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <ComboBox Name="startAmPm" IsEnabled="{Binding Path=IsRecurring}" 
                                      ItemsSource="{Binding Path=TimesOfDay}"
                                      SelectedValue="{Binding Path=Schedule.StartAmPm}">
                                <!--<ComboBoxItem Content="AM" IsSelected="True" />
                                <ComboBoxItem Content="PM" />-->
                            </ComboBox>
                        </Border>

                        <Border Grid.Column="2" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="End AM/PM:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <ComboBox Name="endAmPm" IsEnabled="{Binding Path=IsRecurring}"
                                      ItemsSource="{Binding Path=TimesOfDay}"
                                      SelectedValue="{Binding Path=Schedule.EndAmPm}">
                                <!--<ComboBoxItem Content="AM" IsSelected="True" />
                                <ComboBoxItem Content="PM" />-->
                            </ComboBox>
                        </Border>




                        <!-- Sunday -->
                        <Border Grid.Column="0" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Include Sunday:" />
                        </Border>
                        
                        <Border Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <CheckBox IsChecked="{Binding Path=Schedule.IncludeSunday}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>
                        
                        <!-- Monday -->
                        <Border Grid.Column="0" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Include Monday:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <CheckBox IsChecked="{Binding Path=Schedule.IncludeMonday}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>

                        <!-- Tuesday -->
                        <Border Grid.Column="0" Grid.Row="9" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Include Tuesday:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="9" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <CheckBox IsChecked="{Binding Path=Schedule.IncludeTuesday}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>

                        <!-- Wednesday -->
                        <Border Grid.Column="0" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Include Wednesday:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <CheckBox IsChecked="{Binding Path=Schedule.IncludeWednesday}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>


                        <!-- Thursday -->
                        <Border Grid.Column="2" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Include Thursday:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <CheckBox IsChecked="{Binding Path=Schedule.IncludeThursday}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>


                        <!-- Friday -->
                        <Border Grid.Column="2" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Include Friday:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <CheckBox IsChecked="{Binding Path=Schedule.IncludeFriday}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>

                        <!-- Saturday -->
                        <Border Grid.Column="2" Grid.Row="9" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Include Saturday:" />
                        </Border>

                        <Border Grid.Column="3" Grid.Row="9" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <CheckBox IsChecked="{Binding Path=Schedule.IncludeSaturday}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>

                        <!-- Auto Start -->
                        <Border Grid.Column="0" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
                            <TextBlock Text="Auto Start:" />
                        </Border>

                        <Border Grid.Column="1" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
                            <CheckBox IsChecked="{Binding Path=Schedule.AutoStart}" IsEnabled="{Binding Path=IsRecurring}" />
                        </Border>
                    </Grid>
                </TabItem>
                
                <TabItem Header="TimeStamps"> <!-- Will probably just move this over to the right later -->
                    <!-- TODO: -->
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        
                        <Border Grid.Column="0" Grid.Row="0" Margin="5" VerticalAlignment="Top" HorizontalAlignment="Left">
                            <ListView ItemsSource="{Binding Path=Timestamps}"
                                      ItemTemplate="{StaticResource TimestampListItemTemplate}">
                                
                            </ListView>
                        </Border>
                    </Grid>
                </TabItem>
            </controls:MetroAnimatedSingleRowTabControl>
        </Border>
        
        
        <!-- Action Buttons -->
        <Border Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
            <StackPanel Orientation="Horizontal">
                <Button Name="saveButton" Content="Save" Width="100" Height="25" Click="saveButton_Click" />
                <Button Name="saveExitButton" Content="Save &amp; Back" Width="100" Height="25" Margin="15,0,0,0" Click="saveExitButton_Click" />
                <Button Name="activateButton" Content="Activate" Width="100" Height="25" Margin="15,0,0,0"
                        IsEnabled="{Binding Path=ActivateButtonEnabled}"
                        Visibility="{Binding Path=ActivateButtonVisibility}" Click="activateButton_Click" />
                <Button Name="suspendButton" Content="Suspend" Width="100" Height="25" Margin="15,0,0,0" 
                        IsEnabled="{Binding Path=SuspendButtonEnabled}"
                        Visibility="{Binding Path=SuspendButtonVisibility}" Click="suspendButton_Click" />
                <Button Name="completeButton" Content="Complete" Width="100" Height="25" Margin="15,0,0,0" 
                        IsEnabled="{Binding Path=CompletedButtonEnabled}"
                        Visibility="{Binding Path=CompleteButtonVisibility}" Click="completeButton_Click" />
                <Button Name="cancelButton" Content="Back" Width="100" Height="25" Margin="15,0,0,0" Click="cancelButton_Click" />
            </StackPanel>
        </Border>
        
        <!-- make actvie checkbox -->
        <Border Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
            <CheckBox Content="Check to Make Active Task" IsChecked="{Binding Path=MakeActiveTask}" Visibility="{Binding Path=MakeActiveTaskCheckboxVisibility}" />
        </Border>

        <!-- Pregress Ring -->
        <Border Name="progressBorder" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" Background="Black"  VerticalAlignment="Center" HorizontalAlignment="Center" Panel.ZIndex="3"
                Width="{Binding ElementName=layoutGrid, Path=ActualWidth}" Height="{Binding ElementName=layoutGrid, Path=ActualHeight}" >
            <controls:ProgressRing Name="progressRing" VerticalAlignment="Center" HorizontalAlignment="Center"  />
        </Border>
    </Grid>
</UserControl>

    